home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C ++ / Applications / Conic Sections 0.9.2 / Sources / main.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1997-06-20  |  478 b   |  29 lines  |  [TEXT/CWIE]

  1. //Copyright (c) 1997 Aidan Cully
  2. //All rights reserved
  3.  
  4. #include <math.h>
  5. #include "ConicApp.h"
  6. #include "LMath.h"
  7.  
  8. p3d rotpoint(p3d,float);
  9.  
  10. int main() {
  11.     TConicApp app;
  12.  
  13.     app.EventLoop();
  14.     return(0);
  15. }
  16.  
  17. p3d rotpoint(p3d point,float deg) {
  18.     p3d threepoint;
  19.     float costh,sinth;
  20.  
  21.     sinth = sin(deg*M_PI/180);
  22.     costh = cos(deg*M_PI/180);
  23.  
  24.     threepoint.x = point.x*costh - point.y*sinth;
  25.     threepoint.y = point.x*sinth + point.y*costh;
  26.     threepoint.z = point.z;
  27.  
  28.     return(threepoint);
  29. }